Skip to content

feat: add Claude Opus 4.7 support for Bedrock, Anthropic, Vertex, and OpenRouter#12133

Draft
roomote-v0[bot] wants to merge 1 commit intomainfrom
feature/add-bedrock-claude-opus-4-7
Draft

feat: add Claude Opus 4.7 support for Bedrock, Anthropic, Vertex, and OpenRouter#12133
roomote-v0[bot] wants to merge 1 commit intomainfrom
feature/add-bedrock-claude-opus-4-7

Conversation

@roomote-v0
Copy link
Copy Markdown
Contributor

@roomote-v0 roomote-v0 bot commented Apr 16, 2026

Related GitHub Issue

Closes: #12132

Description

This PR attempts to address Issue #12132 by adding Claude Opus 4.7 model support across multiple providers. Feedback and guidance are welcome.

Changes:

  1. packages/types/src/providers/bedrock.ts - Added anthropic.claude-opus-4-7 model entry with pricing matching Opus 4.6 (same tier). Added to BEDROCK_1M_CONTEXT_MODEL_IDS and BEDROCK_GLOBAL_INFERENCE_MODEL_IDS arrays.

  2. packages/types/src/providers/anthropic.ts - Added claude-opus-4-7 model entry with 128K max tokens, 200K default context (extendable to 1M), reasoning budget support, image support, and tiered pricing for 1M context.

  3. packages/types/src/providers/vertex.ts - Added claude-opus-4-7 model entry and added to VERTEX_1M_CONTEXT_MODEL_IDS array.

  4. src/api/providers/anthropic.ts - Added claude-opus-4-7 to all switch cases for prompt caching, 1M context beta flag support, and getModel() tier pricing logic.

  5. src/api/providers/fetchers/openrouter.ts - Added OpenRouter model ID mapping for anthropic/claude-opus-4.7.

Key details:

  • Model ID: anthropic.claude-opus-4-7 (Bedrock), claude-opus-4-7 (Anthropic/Vertex)
  • Context window: 200K default, extendable to 1M with beta flag
  • Pricing: Same as Opus 4.6 ($5/$25 per million input/output tokens)
  • Supports: images, prompt caching, reasoning budget, extended thinking

Test Procedure

  • All existing bedrock tests pass (57/57)
  • All anthropic + bedrock-reasoning tests pass (38/38)
  • Full lint and type-check pass across all packages

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Interactively review PR in Roo Code Cloud

@amineremache
Copy link
Copy Markdown

Anyone working on merging this? Can we help?

I really want to try 4.7, but also don't want to switch to other tools.

It seems like a straightforward change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Add support for claude opus 4.7 via Amazon Bedrock provider

2 participants